package com.cskaoyan.mapper;

import com.cskaoyan.model.bean.User;
import com.cskaoyan.model.bean.UserExample;
import com.cskaoyan.model.bo.PageBo;
import com.cskaoyan.model.vo.searchvo.DefaultKeyword;
import com.cskaoyan.model.vo.searchvo.HotKeyword;
import com.cskaoyan.model.vo.statictial.UserRowsBean;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    String selectPasswordByUsername(String username);

    void insertMobileAndName(String mobile, int randomCode);

    List<String> selectAllUsername();

    int selectCodeByMobile(String mobile);

    void updatePasswordByMobile(String mobile, String password);

    int selectIdByUsername(String username);

    int selectNumOfStatusByUserId(int id, int i);

    String selectNickNameByUserName(String username);

    String selectAvatarByUserName(String username);

    DefaultKeyword selectOneKeyword();

    List<String> selectAllHistoryKeyword(int id);

    List<HotKeyword> selectHotKeyword();

    List<UserRowsBean> selectGroupByAddTime();

    List<User> getUserList(PageBo pageBo);
}